﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace IFile
{
    /// <summary>
    /// 文件路径接口
    /// </summary>
    public interface IFilePath
    {
        /// <summary>
        /// 获取日期路径
        ///     如.\root\area\device\year\month\day\
        /// </summary>
        /// <param name="root">根名称，如record,snap,alarm</param>
        /// <param name="area">区域名</param>
        /// <param name="device">设备名</param>
        /// <param name="time">日期</param>
        /// <returns></returns>
        string GetDatePath(string root, string area, string device, DateTime time);

        /// <summary>
        /// 获取日期时间路径
        ///     如.\root\area\device\year\month\day\HH-mm-ss-ffff\
        /// </summary>
        /// <param name="root">根目录名</param>
        /// <param name="area">区域名</param>
        /// <param name="device">设备名</param>
        /// <param name="time">日期</param>
        /// <returns></returns>
        string GetDateTimePath(string root, string area, string device,DateTime time);

        /// <summary>
        /// 获取日期路径时间文件名
        ///     如.\root\area\device\year\month\day\HH-mm-ss-ffff.exe
        /// </summary>
        /// <param name="root">根目录名</param>
        /// <param name="area">区域名</param>
        /// <param name="device">设备名</param>
        /// <param name="time">日期</param>
        /// <param name="postfix">后缀名   如：bmp,exe,mp4</param>
        /// <returns></returns>
        string GetDatePathTimeFile(string root, string area, string device, DateTime time, string postfix);

        /// <summary>
        /// 获取日期时间路径时间文件名
        ///     如.\root\area\device\year\month\day\HH-mm-ss-ffff\HH-mm-ss-ffff.bmp
        /// </summary>
        /// <param name="root">根目录名</param>
        /// <param name="area">区域名</param>
        /// <param name="device">设备名</param>
        /// <param name="dateTime">日期</param>
        /// <param name="time">日期</param>
        /// <param name="postfix">后缀名   如：bmp,exe,mp4</param>
        /// <returns></returns>
        string GetDateTimePathTimeFile(string root, string area, string device, DateTime dateTime, DateTime time, string postfix);

        /// <summary>
        /// 获取年月路径下的文件夹所属日期列表
        /// </summary>
        /// <param name="root">根目录名</param>
        /// <param name="area">区域名</param>
        /// <param name="deivce">设备名</param>
        /// <param name="time">时间</param>
        /// <returns></returns>
        DateTime[] GetYearMonthPathDate(string root, string area, string deivce, DateTime time);

        /// <summary>
        /// 获取日期路径下的文件信息列表
        /// </summary>
        /// <param name="root">根目录名</param>
        /// <param name="area">区域名</param>
        /// <param name="device">设备名</param>
        /// <param name="postfix">后缀名   如：bmp,exe,mp4</param>
        /// <param name="time">日期时间</param>
        /// <returns>该日期路径下的文件信息列表</returns>
        DateTime[] GetDatePathFileInfo(string root, string area, string device, string postfix, DateTime time);

        /// <summary>
        /// 获取日期时间路径下的文件信息列表
        /// </summary>
        /// <param name="root">根目录名</param>
        /// <param name="area">区域名</param>
        /// <param name="device">设备名</param>
        /// <param name="postfix">后缀名   如：bmp,exe,mp4</param>
        /// <param name="time">日期时间</param>
        /// <returns>该日期时间路径下的文件信息列表</returns>
        FileInfo[] GetDateTimePathFileInfo(string root, string area, string device, string postfix, DateTime time);

    }
}
